#!/bin/bash
. ./var
. ./Tmpdir
Install_vmware_tools(){
    #安装vmware tools,https://kb.vmware.com/articleview?docId=1018414
    Tmpdir
    cd $dir && wget -V &> /dev/null || yum -y install wget
    wget -V && [ -d  /usr/bin/vmware-toolbox-cmd ] && echoGreen "已经安装vmwaretools,即将退出 $(vmware-toolbox-cmd -v)" &&  rm -rf $dir  &&  exit 0
    wget  $ip/VMwareTools-10.1.6-5214329.tar.gz -O vmware-tools.tar.gz
    tar -xf vmware-tools.tar.gz && mv vmware-tools*/  ../vmware-tools && cd ../vmware-tools && chmod +x ./vmware-install.pl
    echoRed "请执行 $(pwd)/vmware-install.pl ,进行手动完成安装"
    rm -rf $dir
}
